Prompt notice grabs the user’s attention & alerts them of system-related issues/updates.
A prompt uses the base modal component and then adds the class
.slds-modal_prompt to the overall
.slds-modal. The utilities > themes > colors class is placed on the
.slds-modal__head to create the color of the header. In the example, we illustrate using
.slds-theme_error. The class
.slds-theme_alert-texture should be applied to create the striped gradient. The
.slds-modal__footer receives the class
Prompt notifications are similar to modals, in that they are a focus trap, but they should take a slightly different
alertdialog to indicate their severity. Like modals they should be labelled by their headings, but additonally they should be described by the message details of the prompt.
The element containing the prompt message should be the target focus of the browser when it is displayed, which is why we add
There is no requirement for a close button, as the confirmation button should be used to dismiss the prompt, along with the usual Esc key dismissal.
Expected markup (same as Modals, but with the following differences):
- Modal has
- Modal has an
aria-describedbyattribute that matches the id of the modal message container.
- Modal message container container should have
Expected keyboard interaction (same as Modals, with the addition of):
- Modal message container should take initial focus
Overview of CSS Classes
- The CSS class being referred to.
- A description of what the class does.
- Whether the class name is dev-ready (meaning it's fully vetted and tested and safe to use) or prototype (which means it's not fully vetted yet).
- The selector that the class name is allowed to be used on.
- The base level pattern for a component. A variant can be extended to create another variant of that component, for example, a stateful button is a derivative of the base button.
- A single class that can be added to an HTML element of a component to modify its output. Typically these will be colors, sizing and positioning.